package com.atguigu.gulimall.auth.feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.auth.vo.SocialUser;
import com.atguigu.gulimall.auth.vo.UserLoginVo;
import com.atguigu.gulimall.auth.vo.UserRegisterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author weichen
 * @email 519543138@qq.com
 * @date 2022-11-12 上午10:12
 */
@FeignClient("gulimall-member")
public interface MemberFeignService {

    @RequestMapping("/member/member/register")
    R register(@RequestBody UserRegisterVo vos);

    @PostMapping(value = "/member/member/login")
    public R login(@RequestBody UserLoginVo vo);

    @PostMapping(value = "/member/member/oauth2/login")
    R login(@RequestBody SocialUser vo) throws Exception ;
}
